Skip to content

feat: impl git diff#22

Merged
seokju-na merged 8 commits intomainfrom
diff
Jan 27, 2025
Merged

feat: impl git diff#22
seokju-na merged 8 commits intomainfrom
diff

Conversation

@seokju-na
Copy link
Collaborator

This PR implements Diff feature fromt git.
See API from examples codes below:

import { openRepository } from 'es-git';
import fs from 'node:fs/promises';

const repo = await openRepository('/path/to/repo');
await fs.writeFile('/path/to/repo/A', 'A modified');

const diff = repo.diffIndexToWorkdir();
const deltas = [...diff.deltas()];
console.log(deltas.length); // 1

},
"engines": {
"node": ">= 10"
"node": ">= 16"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

napi6 requires minimum Node.js 16 version

@seokju-na seokju-na merged commit fa60a21 into main Jan 27, 2025
17 of 18 checks passed
@seokju-na seokju-na deleted the diff branch January 27, 2025 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant